<template>
  <div></div>
</template>

<script setup>

const initLoginQCode = () => {
  let toUrl = "https://login.dingtalk.com/oauth2/auth?";

  let url = import.meta.env.VITE_DOMAIN_NAME
  toUrl += "redirect_uri=" + encodeURIComponent(url) + "%2Fuser%2Fauth"
  toUrl += "&response_type=code" +
    "&client_id=dingmujtxxzpqcdai71h" +
    "&scope=openid corpid" +
    "&prompt=consent"
  "&corpId=ding484306ac6ebd797f35c2f4657eb6378f"
  window.location.href = toUrl;
}

onMounted(() => {
  initLoginQCode();
});

</script>
